package day13.tarena.homework;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class MyStack {
	
	private final List list = new LinkedList();
	
	public void push(Object obj){  //入栈
		list.add(obj);
	}
	
	public Object pop(){  //出栈
		return list.remove(list.size()-1);
	}
	
	public boolean inEmpty(){ //判断是否为空
		return list.size() == 0;
	}
	
	public Object peek(){   //只查看当前的元素而不删除；
		return list.get(list.size()-1);
	}
	public static void main(String[] args){
		MyStack1 a = new MyStack1(16,"wang");
		MyStack1 b = new MyStack1(15,"LI");
		MyStack1 c = new MyStack1(18,"yang");
		MyStack1 d = new MyStack1(17,"hu");
		for(int i=0; i<4; i++){
			
		}
		
//		System.out.println(a);
//		System.out.println(b);
//		System.out.println(c);
//		System.out.println(d);
	}
}